<template>
	<div class="page">
		<p class="title">基本用法</p>
		<p>
			<gr-input v-model="text" suffix-icon="arrow-right-bold" @icon-click="show1 = true" round left-label="从底部弹出"/>
			<gr-input v-model="text" suffix-icon="arrow-right-bold" @icon-click="show2 = true" round left-label="从顶部弹出"/>
			<gr-input v-model="text" suffix-icon="arrow-right-bold" @icon-click="show3 = true" round left-label="从左侧弹出"/>
			<gr-input v-model="text" suffix-icon="arrow-right-bold" @icon-click="show4 = true" round left-label="从右侧弹出"/>
		</p>
		<gr-popup v-model="show1" position="bottom">
			<p>从底部弹出</p>
		</gr-popup>
		
		<gr-popup v-model="show2" position="top">
			<p>从顶部弹出</p>
		</gr-popup>
		
		<gr-popup v-model="show3" position="left">
			<p>从左侧弹出</p>
		</gr-popup>
		
		<gr-popup v-model="show4" position="right">
			<p>从右侧弹出</p>
		</gr-popup>
		
		<p class="title">增加圆角</p>
		<gr-input v-model="text" suffix-icon="arrow-right-bold" @icon-click="show5 = true" round left-label="圆角"/>
		<gr-popup v-model="show5" position="bottom" round>
			<p>从底部弹出</p>
		</gr-popup>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				text: '',
				show1: false,
				show2: false,
				show3: false,
				show4: false,
				show5: false,
				show6: false,
				show7: false
			}
		},
		methods: {
			fileReaded(file) {
				console.log(11111111);
				console.log(file); //增加multiple属性后，file为数组结构，1到多个文件
			}
		}
	}
</script>

<style lang="scss">
	html {
		background-color: #f8f8f8;
		.page {
			padding: 15px;
		}
	}
</style>
